$(document).ready(startLogin);


function startLogin() {
    $(".container")[0].className="animate__animated animate__fadeInDown  container";
}

$("#denglu").click(dengLuPanDuan);
$("#wangJiMima").click(tishi);
$("#lianXiGuanLi").click(tiShiYingcang);
function dengLuPanDuan() {
    for (var i=0;i<staffDate.length;i++){
        if($('#account').val()==staffDate[i].account && $('#password').val()==staffDate[i].password ){
            localStorageMin();
            $(window).attr('location','demo.html');
            $(".tiShi").text("");
            break;
        }else{
            $(".tiShi").text("账号密码错误")
        }
    }
}


/*localstorage*/
function localStorageMin() {

        var storage =window.localStorage; //获得localStorage
        var account = $("#account").val();
        var password = $("#password").val();

        localStorage.setItem("account",account);//键值对方式存值
        localStorage.setItem("password",password);
}

function tishi() {
        $("#tiShiXinXi").fadeIn();
}
function tiShiYingcang() {
    $("#tiShiXinXi").fadeOut();
}